home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20041116-20060924 / 000132_fdc@columbia.edu_Thu Jul 28 11:01:26 2005.msg < prev    next >
Internet Message Format  |  2006-09-27  |  2KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Redial on No Dialtone
  5. Date: 28 Jul 2005 14:37:29 GMT
  6. Organization: Columbia University
  7. Lines: 49
  8. Message-ID: <slrndehrd9.ovm.fdc@sesame.cc.columbia.edu>
  9. References: <1122507809.564246.163530@g47g2000cwa.googlegroups.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1122561449 4430 128.59.59.56 (28 Jul 2005 14:37:29 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 28 Jul 2005 14:37:29 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15374
  17.  
  18. On 2005-07-27, Allen <amtekdesign@gmail.com> wrote:
  19. : It appears that by default, redialing occurs for dial failures such as
  20. : BUSY or NO CARRIER, but the dialer aborts on the first NO DIALTONE
  21. : error. Is it possible to configure Kermit to redial on NO DIALTONE?
  22. :
  23. Not to redial automatically.
  24.  
  25. : I'm using
  26. :   SET DIAL RETRIES 5
  27. :   DIAL \m(name)
  28. :   IF FAIL DIAL \m(name)
  29. :
  30. : which will force a second attempt on NO DIALTONE, and gives me 10
  31. : retries on a persistent BUSY/NO CARRIER, but is there a better way?
  32. :
  33. : Is there a status variable I can test that tells me why the DIAL
  34. : command failed?
  35. :
  36. Kermit has lots of built-in variables.  You can see what they are by
  37. giving the command SHOW VARIABLES.  Among them are:
  38.  
  39.   \v(dialcount) = 0
  40.   \v(dialnumber) =
  41.   \v(dialresult) =
  42.   \v(dialstatus) = -1
  43.   \v(dialsuffix) =
  44.   \v(dialtype) = -1
  45.  
  46. \v(dialstatus) is the one you're looking for.  The values are shown in
  47. Table 5-3 on page 116 of "Using C-Kermit".  A value of 24 corresponds to 
  48. NO DIALTONE.  You can also use the \v(dialresult) variable to retrieve the
  49. actual message from the modem.
  50.  
  51. So if you want to treat NO DIALTONE as a recoverable error, you can do
  52. something like this (I didn't test it):
  53.  
  54.   .\%n = 5  
  55.   while > \%n 0 {
  56.       set dial retries \%n
  57.       dial \m(name)
  58.       if success break
  59.       if != \v(dialresult) 24 break
  60.       decrement \%n \v(dialcount)
  61.   }
  62.   if < \v(cx_status) 1 stop 1 Call failed: \v(name)
  63.  
  64. The \v(cx_status) variable is positive if there is an active connection.
  65.  
  66. - Frank